package com.blockchain.repository;

import com.blockchain.model.Follow;
import com.blockchain.model.User;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface FollowRepository extends JpaRepository<Follow,Long> {
    // 根据关注者和被关注者查询关注关系
    Follow findByFollowerAndFollowed(User follower, User followed);
    long countByFollower(User follower);
    long countByFollowed(User followed);
    List<Follow> findByFollower(User follower);

}
